home *** CD-ROM | disk | FTP | other *** search
- property pCharCode, pSpr, pEvents
-
- on beginSprite me
- global gTestFlashIndex, gImplementedCharacters, gCharacterActions, gRecipes
- if voidp(gRecipes) then
- initRecipes()
- end if
- if voidp(gTestFlashIndex) then
- gTestFlashIndex = 1
- end if
- if gTestFlashIndex > count(gImplementedCharacters) then
- put "Test complete"
- halt()
- else
- pCharCode = getPropAt(gImplementedCharacters, gTestFlashIndex)
- end if
- put "Testing VO elements in database for" && pCharCode
- pEvents = gCharacterActions[pCharCode]
- end
-
- on exitFrame me
- repeat with thisEntry in pEvents
- repeat with X = 1 to count(thisEntry)
- thisEvent = thisEntry[1]
- repeat with Y = 1 to count(thisEvent)
- eventType = getPropAt(thisEvent, Y)
- if eventType = #vo then
- VOname = thisEvent[Y]
- soundFile = VOpath(pCharCode, VOname)
- if FileExists(soundFile) then
- else
- debugAlert("Missing sound file" && soundFile)
- end if
- next repeat
- end if
- if eventType = #anim then
- label = thisEvent[Y]
- thisLabel = findLabel(sprite(1), label)
- if thisLabel then
- else
- debugAlert("Can't find anim label" && label && "for" && pSpr.member.name)
- end if
- next repeat
- end if
- if eventType = #RID then
- recipeID = thisEvent[Y]
- if voidp(getRecipe(recipeID)) then
- debugAlert("Recipe" && recipeID && "could not be found in the recipe database")
- else
- end if
- next repeat
- end if
- debugAlert("Unknown event of type" && eventType && "not verified")
- end repeat
- end repeat
- end repeat
- put "done testing VO elements in database for" && pCharCode
- go("test done")
- end
-